redirect to route laravel

37

laravel route redirect -

Route::redirect('/here', '/there');
or
return redirect(route('register'));

laravel return redirect to named route -

return redirect()->route('login');

redirect to route laravel -

Route::post('/user/profile', function () {
    // Update the user's profile...

    return redirect('/dashboard')->with('status', 'Profile updated!');
});

Redirect::route('profile') and with() in laravel -

// For a route with the following URI: profile/{id}

return redirect()->route('profile', [$user]);

Comments

Submit
0 Comments